// C++ author 清晨与猫鱼
#include <iostream>
#include <string>
#include "Realize.h"

using namespace std;

int main(const int argc, const char** argv)
{	
    // 创建一个服务1
	Service* service = ServiceLocator::getService("SERVICE1");

    // 执行
    service->execute();

    cout << "\n\n";

    // 获取服务2
    service = ServiceLocator::getService("SERVICE2");

    // 执行
    service->execute();

    cout << "\n\n";

    // 获取服务1
    service = ServiceLocator::getService("SERVICE1");

    service->execute();

    cout << "\n\n";
    
    service = ServiceLocator::getService("SERVICE2");

    service->execute();
}